package com.dong.controller;

import com.dong.dto.CaptchaCheckDTO;
import com.dong.services.CaptchaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/captcha")
public class CaptchaController {
    @Autowired
    CaptchaService captchaService;

    @RequestMapping("/check")
    public String check(@RequestBody CaptchaCheckDTO captchaCheckDTO){
        return captchaService.tencentCaptchaCheck(captchaCheckDTO.getTicket(),captchaCheckDTO.getRandStr(),null);
    }
}
